import server from '../util/request.js'
export function findAll(data){
    return server({
        url: '/drug/find',
        method: 'POST',
        data
    })
}

export function addDrug(data){
    return server({
        url: '/drug/add',
        method: 'POST',
        data
    })
}
export function updateDrug(data){
    return server({
        url: '/drug/update',
        method: 'PUT',
        data
    })
}
export function deleteDrug(id){
    return server({
        url: `/drug/delete/${id}`,
        method: 'DELETE',
    })
}
export function findDrugs(){
    return server({
        url: '/drug',
        method: 'GET',
    })
}
export function addPrescription(data){
    return server({
        url: '/drugDistribute/add',
        method: 'POST',
        data
    })
}
